package server

import (
	"fanqiechaodan-blog/config"
	"fanqiechaodan-blog/router"
	"go.uber.org/zap"
	"net/http"
)

var APP = &MyServer{}

type MyServer struct{}

func (*MyServer) Start() {
	zap.S().Info("服务开始启动")
	server := http.Server{Addr: config.Cfg.System.IP + ":" + config.Cfg.System.Port}
	router.Router()
	if err := server.ListenAndServe(); err != nil {
		panic(err)
	}
}
